package com.cloud.tools.log.project.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.tools.log.project.mapper.OperateLogMapper;
import com.cloud.tools.log.project.model.entity.OperateLog;
import com.cloud.tools.log.project.service.IOperateLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 操作日志记录 服务实现类
 * </p>
 *
 * @author Sam
 * @since 2021-04-07
 */
@Service
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements IOperateLogService {

    @Async
    @Override
    public void saveAsyncLog(OperateLog operateLog) {
        this.save(operateLog);
    }

    @Override
    public void cleanLog() {
        baseMapper.cleanLog();
    }
}
